<!--#include file="utf-8.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="seeion.asp"-->
<!--#include file="page.asp"-->
<%
r_Province=request("Province")
if r_Province="" then
r_DateTime="广东"
end if
'response.write (r_DateTime)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>列表管理</title>
<link href="images/style.css" type="text/css" rel="stylesheet" />
<script src="WdatePicker.js" language="javascript"></script>
<style type="text/css">
<!--
body{line-height:25px;font-family:sans-serif; }
a:hover { color:red;text-decoration:none}
.STYLE1 {color: #1562bf; font-size: 14px; font-weight: bold;}
.STYLE2 {color: #FF0000; font-size: 14px; font-weight: bold;  }
.STYLE3 {font-size: 14px; font-weight: bold; }
.list {width:330px;height:20px;padding-left:10px;line-height:23px;overflow:hidden;}
.list a:link,.list a:visiter {color:#1562bf;}
.list a:hover  {background:#eee;}
.list1 {width:330px;height:20px;padding-left:10px;line-height:23px;overflow:hidden;}
.line1 {background:url(/admin/images/pv_bg3.jpg) no-repeat; font-Size:11px;width:60px;}
.line1 img {margin-top:5px;}
-->
</style>
<script>
function changeShowDate(){
var f = new Date(document.getElementById('from').value.replace(/\-/g, "\/"));
var t = new Date(document.getElementById('to').value.replace(/\-/g, "\/"));        
if(f > t) {
alert("结束日期不能小于开始日期！");
return false;
} 
var f1 = document.getElementById('from').value;
var t1 = document.getElementById('to').value;

window.location.href="/admin/Traffic_stat.asp?from="+f1+"&to="+t1;
}
function changeShowProvince(){
var c = document.getElementById("sel_Province").value;
window.location.href="/admin/admin_Traffic_Stat_Province.asp?Province="+c;
}
</script>

</head>
<body>
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td height="30" colspan="2" bgcolor="#ffffff"> <label> 按省查询：
<select name="sel_Province" id="sel_Province" >
<%
set rs=server.createobject("adodb.recordset") 
exec="select distinct IP_Province from IPToCity" 
rs.open exec,conn,1,1 
do while not rs.eof 
response.write "<option value="&rs("IP_Province")&">"&rs("IP_Province")&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
　
<input type="submit" onClick="changeShowProvince()" name="button2" id="button2" value="查询">
</label></td>
</tr>

<tr>
<td colspan="2" bgcolor="#FFFFFF">
<p>
<%	
set rs=server.createobject("adodb.recordset") 
exec="select * from Traffic_Stat where Province like '%"&r_Province&"%' order by id desc" 
rs.open exec,conn,1,1 
if rs.eof then
response.Write "&nbsp;暂无数据！"
else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount 
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif  page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if	
%>
<%For i=1 To x%>
</p>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="cedced" style="font-family : sans-serif;">
<tr>
<td width="20%" height="25" bgcolor="e9f1fa"><strong>时间：</strong><span class="Traffic_Stat_blue1"><%=rs("datetime")%></span></td>
<td width="20%" height="25" bgcolor="e9f1fa">IP：<span class="Traffic_Stat_blue1"><%=rs("ip")%></span></td>
<td width="35%" height="25" bgcolor="e9f1fa"><strong>地区：</strong><span class="Traffic_Stat_blue1"><%=rs("Province")%> - <%=rs("City")%></span></td>
<td width="5%" height="25" align="center" bgcolor="e9f1fa"><a href="javascript:if(confirm('确定要删除该条记录吗?')){window.location.href='admin_Traffic_stat_delete.asp?t=line&id=<%=rs("id")%>';}else{}">删除</a></td>
</tr>
<tr>
<td height="25" colspan="2"><strong>来路：</strong><%=rs("Referer")%></td>
<td height="25" colspan="2"><strong>受访：</strong><%=rs("page")%> (
<%
dim Num2,rs2,exec2
Num2=0
set rs2=server.createobject("adodb.recordset") 
exec2="select * from Traffic_Stat where datetime like '%"&request_Date&"%' and page='"&rs("page")&"' order by id desc" 
rs2.open exec2,conn,1,1 
do while not rs2.eof 
Num2=Num2+1
rs2.movenext
loop
rs2.close
set rs2 = nothing
response.write (Num2)
%>
)</td>
</tr>
</table>
<%rs.movenext
next
%>
<%
end if
%></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><%'以下显示分页
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
rs.close
set rs=nothing
%></td>
<td bgcolor="#FFFFFF">&nbsp;</td>
</tr>
</table>
</body>
</html>
<% 
if Request.QueryString("xiugaipx")="ok" then
id=request("id") 
sql="select * from about where id="&id 
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,3
IF not isNumeric(request("px_id")) then
response.write("<script>alert(""排序ID必须为数字！""); history.go(-1);</script>")
response.end
end if
rs("px_id")=request.form("px_id") 
rs.update 
rs.close 
response.Write("<script language=""javascript"">alert(""修改排序成功！"");window.location.href='Manage_About.asp';</script>")
end if
%> 
<%
if request("act")="del" then
id=request("id")
if id="" then
Response.Write "<script language='javascript'>alert('参数错误!');document.location.href('Manage_About.asp');</script>"
Response.End()
end if
set rs=server.createobject("adodb.recordset")
rs.open "Select * from about where id="&Request("id"),conn,1,3
if rs.bof and rs.eof then
Response.Write "<script language='javascript'>alert('数据库中没有该记录！');document.location.href('Manage_About.asp');</script>"
Response.End()
else
rs.Delete
rs.Update
Response.Write "<script language='javascript'>alert('成功删除指定的信息！');document.location.href('Manage_About.asp');</script>"
end if
end if
%>
